<template>
  <div>
    <h3>我是孙子 --- {{goods}}</h3>
    <button @click="changeGoods(500)">卖了传家宝</button>
  </div>
</template>

<script>
import { inject } from 'vue'
export default {
setup() {
    const goods = inject('goods')
    const changeGoods = inject('changeGoods')
    return {
      goods,
      changeGoods
    }
  }
}
</script>

<style>

</style>
